/* Global Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #475569;
    --accent-color: #f59e0b;
    --text-color: #1e293b;
    --light-color: #f8fafc;
    --dark-color: #0f172a;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: #f0f9ff;
    background-image: linear-gradient(135deg, #f0f9ff 0%, #e8f8ff 100%);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

#animation-container {
    width: 60px;
    height: 60px;
    margin-right: 15px;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    letter-spacing: -1px;
}

h1 span {
    color: var(--accent-color);
}

.tagline {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 300;
}

/* Card Styles */
.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 30px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Button Styles */
.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #334155;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

/* Audio Results */
.audio-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.audio-item {
    background-color: #f8fafc;
    border-radius: var(--border-radius);
    padding: 15px;
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.audio-item:hover {
    border-color: var(--primary-color);
}

.audio-text {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.audio-controls audio {
    width: 100%;
    margin-right: 10px;
}

.download-btn {
    background-color: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.download-btn:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
}

#loading-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .audio-results {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}